<template>
<div>
  <div class="my-counter" >
    <button type="button" class="btn btn-light" @click="jian">-</button>
    <input type="text" class="form-control inp" :value='value'>
    <button type="button" class="btn btn-light" @click="jia">+</button>
  </div>
  </div>
</template>

<script>
export default {
  props:['value','list'],
  methods:{
    jian(){
      
      this.$emit('input',this.value-1)
      
    },
    jia(){
      this.$emit('input',this.value+1)
    }
  }


}
</script>

<style lang="less" scoped>
.my-counter {
  display: flex;
  .inp {
    width: 45px;
    text-align: center;
    margin: 0 10px;
  }
  .btn, .inp{
    transform: scale(0.9);
  }
}
</style>